package com.hqyj.ssm_project.service;

import com.hqyj.ssm_project.mapper.IdcardMapper;
import com.hqyj.ssm_project.mapper.UserMapper;
import com.hqyj.ssm_project.pojo.Idcard;
import com.hqyj.ssm_project.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IdcardServiceImp implements IdcardService{
    @Autowired
    private IdcardMapper idcardMapper;
    @Autowired
    private UserMapper userMapper;
    @Override
    public int deleteByPrimaryKey(Integer idcardId) {
        return idcardMapper.deleteByPrimaryKey(idcardId);
    }

    @Override
    public int insert(Idcard row) {
        return idcardMapper.insert(row);
    }

    @Override
    public int insertSelective(Idcard row) {
        return idcardMapper.insertSelective(row);
    }

    @Override
    public Idcard selectByPrimaryKey(Integer idcardId) {
        return idcardMapper.selectByPrimaryKey(idcardId);
    }

    @Override
    public int updateByPrimaryKeySelective(Idcard row) {
        return idcardMapper.updateByPrimaryKeySelective(row);
    }

    @Override
    public int updateByPrimaryKey(Idcard row) {
        return idcardMapper.updateByPrimaryKey(row);
    }

    @Override
    public List<Idcard> findAllIdcard() {
        return idcardMapper.findAllIdcard();
    }

    @Override
    public List<User> findUserNoidcard() {
        return userMapper.findUserNoidcard();
    }

    @Override
    public int insertidcard(Idcard idcard) {
        return idcardMapper.insertidcard(idcard);
    }

    @Override
    public Idcard selectIdcardAndUser(Integer id) {
        return idcardMapper.selectIdcardAndUser(id);
    }
}
